package student

import (
	"github.com/zachary/tbox/internal/types"
	"github.com/zachary/tbox/internal/web/handler"
	"github.com/zeromicro/go-zero/rest"
	"net/http"
)

func AuthRoutes() []rest.Route {
	return []rest.Route{
		{
			Method:  http.MethodPost,
			Path:    "/add",
			Handler: handler.BaseHandler(&types.StudentAddReq{}, addHandler),
		},
		{
			Method:  http.MethodGet,
			Path:    "/list",
			Handler: handler.BaseHandler(&types.StudentSearchReq{}, listHandler),
		},
		{
			Method:  http.MethodPost,
			Path:    "/edit",
			Handler: handler.BaseHandler(&types.StudentEditReq{}, editHandler),
		},
	}
}
